<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>

<form id="pagerForm" method="post" action="module_list">
    <input type="hidden" name="pageNum" value="${pageModel.pageNum}" />
    <input type="hidden" name="numPerPage" value="${pageModel.numPerPage}" />
    <input type="hidden" name="name" value="${module.name}" />
</form>

<form onsubmit="return navTabSearch(this);" action="module_list" method="post">
<div class="pageHeader">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>模块名称</label>
                    <input type="text" name="name" value="${module.name}" class="textInput" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
        </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="to_module_add" target="dialog" rel="to_module_add"
                   width="600" height="400" mask="true"><span>添加</span></a></li>
            <li class="line">line</li>
            <li><a class="edit" href="to_module_edit?id={item_id}" target="dialog" rel="to_module_edit"
                   width="600" height="400" mask="true"><span>修改</span></a></li>
            <li class="line">line</li>

        </ul>
    </div>
    <table class="table" width="100%" layoutH="137">
        <thead>
        <tr>
            <th>序号</th>
            <th>模块名称</th>
            <th>地址</th>
            <th>logo</th>
            <th>是否顶级模块</th>
            <th>顶级模块</th>
            <th>状态</th>
            <th>创建时间</th>
        </tr>
        </thead>
        <tbody>
            <c:forEach var="item" items="${list}" varStatus="st">
                <tr target="item_id" rel="${item.id}" ondblclick="tableclick()">
                    <td>${st.index+1}</td>
                    <td>${item.name}</td>
                    <td>${item.url}</td>
                    <td>
                        <c:if test="${item.logo!=null and item.logo!='' }">
                            <a href="image_list?url=${item.logo}" target="navTab">查看图片</a>
                        </c:if>
                    </td>
                    <td>
                        <c:choose>
                            <c:when test="${item.parentId == 0}">是</c:when>
                            <c:otherwise>否</c:otherwise>
                        </c:choose>
                    </td>
                    <td>${item.parent.name}</td>
                    <td>
                        <c:choose>
                            <c:when test="${item.status == 1}">上线</c:when>
                            <c:when test="${item.status == 2}">下线</c:when>
                        </c:choose>
                    </td>
                    <td>
                        <fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm"/>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>

    <c:import url="../core/pagebar.inc.jsp" />

</div>
</form>


